home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / devices / modm0dev.zoo / modm0dev.asc < prev    next >
Encoding:
Text File  |  1993-10-25  |  6.2 KB  |  196 lines

  1.  
  2.  
  3. MODM0DEV(8)                MiNT Programmer's Manual                MODM0DEV(8)
  4.  
  5.  
  6. NAME
  7.      modm0dev.ttp, modm0dev.syslog -  install  the  /dev/cua0  and  /dev/ttyd0
  8.      devices
  9.  
  10. SYNOPSIS
  11.      modm0dev.ttp      # light version
  12.      modm0dev.syslog   # syslog version
  13.  
  14. DESCRIPTION
  15.      modm0dev will install dial-in and dial-out devices for the Atari ST first
  16.      serial interface, named /dev/ttyd0 and /dev/cua0 respectively. The former
  17.      is usually attached to a getty process  to  handle  the  incoming  calls,
  18.      while the latter is used to initiate a call (for instance with cu or uucp
  19.      ). The dial-in device monitors the DCD line of the  serial  port  (unless
  20.      you  have  specified the soft-carrier mode; see below) and no data can be
  21.      read nor written if there is no connection. On the other hand, the  dial-
  22.      out  device  can  communicate  with  the remote modem or terminal even if
  23.      there is no connection present.
  24.  
  25.      These  devices  are   mutually   exclusive;   although   you   can   have
  26.      simultaneously  file  descriptors  for both devices, you won't be able to
  27.      open the dial-out device if there is a connection  on  the  dial-in  one.
  28.      Conversely,  the  dial-out  device  will  be  put  in  "idle"  mode while
  29.      /dev/cua0 is in use.
  30.  
  31.      Unlike the dial-in device, the dial-out device is always  assumed  to  be
  32.      opened  in  exclusive mode. Therefore, file locking is unnecessary on the
  33.      dial-out device. It is rarely needed on the dial-in device, so it  hasn't
  34.      been implemented.
  35.  
  36.      It is sometimes desirable to assume that a carrier is always  present  on
  37.      the  serial  device,  especially  when you have a terminal attached to it
  38.      instead of a modem. This is called the "soft carrier"  mode  and  can  be
  39.      modified with the TIOCSSOFTCAR ioctl call.
  40.  
  41.      In this case, it is also desirable to clear the hangup-on-close flag  for
  42.      the  dial-in  device,  since  a  directly-attached terminal will probably
  43.      ignore hangups. You can set this flag with the TIOCSHUPCL ioctl call.
  44.  
  45.      The  installer  should  be  run  from  your  mint.cnf  or   /etc/rc.local
  46.      configuration  file, since init (1) will need the dial-in device to spawn
  47.      a getty on it.  It configures the serial interface to 19200 bps, one stop
  48.      bit,  eight-bit characters, and no parity.  These settings can be changed
  49.      by a subsequent stty (1) call. An enhanced version of stty , aware of the
  50.      supplementary   ioctl  calls,  is  provided  in  the  distribution.   The
  51.      software-carrier and hangup-control flags are called "local" and "hupcl".
  52.  
  53.      Apart from all standard terminal ioctl calls, the driver also  recognizes
  54.      the following ones (values are in modm0dev.h):
  55.  
  56.      TIOCFLUSH
  57.           clears the input and output buffers.
  58.  
  59.      TIOCSBRK
  60.           sets a break condition.
  61.  
  62.  
  63.  
  64.                                September, 1993                               1
  65.  
  66.  
  67.  
  68. MODM0DEV(8)                MiNT Programmer's Manual                MODM0DEV(8)
  69.  
  70.  
  71.      TIOCCBRK
  72.           clears a break condition.
  73.  
  74.      TIOCIBAUD, TIOCOBAUD
  75.           get and set the baud rate. The supported speeds are: 300, 600, 1200,
  76.           1800, 2400, 4800, 9600 and 19200 bps.
  77.  
  78.      TIOCGHUPCL
  79.           takes a pointer to a short int;  returns  1  if  hangup-on-close  is
  80.           active, 0 otherwise. Default is 1.
  81.  
  82.      TIOCSHUPCL
  83.           takes a pointer to a short int, containing  the  new  value  of  the
  84.           hangup-on-close flag. The old value is returned.
  85.  
  86.      TIOCGSOFTCAR
  87.           takes a pointer to a short int; returns 1 if  soft-carrier  mode  is
  88.           active, i.e. if a carrier is assumed to be always present. Otherwise
  89.           returns 0, meaning that the  hardware  carrier  line  is  monitored.
  90.           Default is 0.
  91.  
  92.      TIOCSSOFTCAR
  93.           takes a pointer to a short int, containing  the  new  value  of  the
  94.           soft-carrier flag. The old value is returned.
  95.  
  96.  
  97.      For security reasons,  only  root  can  open  the  dial-in  and  dial-out
  98.      devices.  An  unprivileged  user  cannot  change the global configuration
  99.      either (baudrate,  parity,  and  rts/cts,  soft-carrier,  hangup-on-close
  100.      flags); the ioctl call will silently fail. However, setting the baud rate
  101.      to 0 is allowed and will hang up the phone line immediately.
  102.  
  103. SEE ALSO
  104.      stty(1), init(1)
  105.  
  106. DIAGNOSTICS
  107.      Error messages during installation are reported on standard  output,  and
  108.      modm0dev exits with a negative return-code.
  109.  
  110.      While the driver is running,  hardware  error  messages  (overrun  error,
  111.      frame  error,  parity error, break) are reported on the console if you're
  112.      using the "light" version ( modm0dev.ttp ) or to the system  logger  with
  113.      the "syslog" version ( modm0dev.syslog ).
  114.  
  115. AUTHOR
  116.      Thierry Bousch       Internet: bousch@suntopo.matups.fr
  117.      44 Bd du Temple      Fidonet:  Thierry Bousch @ 2:320/100.9
  118.      75011 PARIS
  119.      FRANCE
  120.  
  121. BUGS
  122.      Overrun errors  (MFP  internal  overflow)  are  frequent  when  data  are
  123.      received  continuously  at  high  speeds  on  not-too-fast  machines;  at
  124.      19200bps on an 8MHz Atari ST, there can be an erroneous  byte  every  ten
  125.      kilobytes.   Is  it  a  bug in my code, or is it MiNT's context-switching
  126.      code which prevents the interrupts from being serviced properly?
  127.  
  128.  
  129.                                September, 1993                               2
  130.  
  131.  
  132.  
  133. MODM0DEV(8)                MiNT Programmer's Manual                MODM0DEV(8)
  134.  
  135.  
  136.      Since we  are  completely  replacing  the  MFP  interrupt  routines,  the
  137.      standard  device  /dev/modem1  ,  as well as the standard bios functions,
  138.      will no longer work  (unless,  of  course,  you  redirect  the  AUX  bios
  139.      device).
  140.  
  141.      Synchronous modes are not supported. Not all speeds are supported. I  did
  142.      not try to implement higher speeds (38400 bps and more) because I already
  143.      had too many errors at 19200 bps.
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.                                September, 1993                               3
  195.  
  196.